<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Date</title>
    <style>
        body {
            font-size: 12px;
            color: #222;
        }

        div {
            margin: 15px;
        }

        label {
            margin: 5px;
        }

        span {
            border-radius: 2px;
            border: 1px solid #d9d9d9;
            padding: 3px;
        }
    </style>
</head>

<body>
    <div class='case1'><label>toMilliSeconds()</label><span></span></div>
    <div class='case2'><label>toMilliSeconds(false)</label><span></span></div>
    <div class='case3'><label>format('yyyy-MM-dd HH:mm:ss')</label><span></span></div>
    <div class='case4'><label>plusHours(1)</label><span></span></div>
    <div class='case5'><label>plusDays(1)</label><span></span></div>
    <div class='case6'><label>plusMonths(1)</label><span></span></div>
    <div class='case7'><label>plusYears(1)</label><span></span></div>
    <div class='case8'><label>diffDays(new Date())</label><span></span></div>
    <div class='case9'><label>toDate(new Date())</label><span></span></div>
    <div class='case10'><label>toDate(new Date().getTime())</label><span></span></div>
    <div class='case11'><label>toDate('2022/02/22 12:12:12')</label><span></span></div>
</body>
<script defer="true" type="text/javascript">
    import("../src/js/date.js").then(({ default: JscDate }) => {
        document.querySelector('.case1').querySelector('span').textContent = new Date().toMilliSeconds();

        document.querySelector('.case2').querySelector('span').textContent = new Date().toMilliSeconds(false);

        document.querySelector('.case3').querySelector('span').textContent = new Date().format('yyyy-MM-dd HH:mm:ss');

        document.querySelector('.case4').querySelector('span').textContent = new Date().plusHours(1).format('yyyy-MM-dd HH:mm:ss');

        document.querySelector('.case5').querySelector('span').textContent = new Date().plusDays(1).format('yyyy-MM-dd HH:mm:ss');

        document.querySelector('.case6').querySelector('span').textContent = new Date().plusMonths(1).format('yyyy-MM-dd HH:mm:ss');

        document.querySelector('.case7').querySelector('span').textContent = new Date().plusYears(1).format('yyyy-MM-dd HH:mm:ss');

        document.querySelector('.case8').querySelector('span').textContent = new Date().plusMonths(1).diffDays(new Date());

        document.querySelector('.case9').querySelector('span').textContent = JscDate.toDate(new Date()).format('yyyy-MM-dd HH:mm:ss');

        document.querySelector('.case10').querySelector('span').textContent = JscDate.toDate(new Date().getTime()).format('yyyy-MM-dd HH:mm:ss');

        document.querySelector('.case11').querySelector('span').textContent = JscDate.toDate('2022/02/22 12:12:12').format('yyyy-MM-dd HH:mm:ss');
    });
</script>

</html>